import request from '@/utils/request'

// 查询每日记录列表
export function listDay(query) {
  return request({
    url: '/stock/day/list',
    method: 'get',
    params: query
  })
}

// 查询每日记录列表
export function readPath(query) {
  return request({
    // url: 'stock/day/readFile?path=C:%5CUsers%5Cwen%5CDesktop%5Cdata',
    url: 'stock/day/readFile?path=C%3A%5CUsers%5CAdministrator%5CDesktop%5Csystem%5Cdata',
    method: 'get',
  })
}

// 查询每日记录列表
export function callThx(query) {
  return request({
    url: 'stock/day/callThx',
    method: 'get',
  })
}

// 查询每日记录详细
export function getDay(recordId) {
  return request({
    url: '/stock/day/' + recordId,
    method: 'get'
  })
}

// 新增每日记录
export function addDay(data) {
  return request({
    url: '/stock/day',
    method: 'post',
    data: data
  })
}

// 修改每日记录
export function updateDay(data) {
  return request({
    url: '/stock/day',
    method: 'put',
    data: data
  })
}

// 删除每日记录
export function delDay(recordId) {
  return request({
    url: '/stock/day/' + recordId,
    method: 'delete'
  })
}
